/*
 * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright
 * ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 * implied. See the License for the specific language governing permissions and limitations under the License.
 *
 */

package com.spark.sniffer.logging.config;

import com.spark.sniffer.logging.core.LogLevel;
import com.spark.sniffer.logging.core.WriterFactory;

/**
 * This is the core config in sniffer agent.
 *
 * @author wusheng
 */
public class Config {

    public static class Logging {
        /**
         * Log file name.
         */
        public static final String FILE_NAME = "spark-sniffer-agent";

        /**
         * Log file suffix date format
         */
        public static final String FILE_DATE_FORMAT = "yyyy-MM-dd";

        /**
         * Log files directory. Default is blank string, means, use "system.out" to output logs.
         *
         * Ref to {@link WriterFactory#getLogWriter()}
         */
        public static final String DIR = System.getProperty("logsniffer", "/apps/logs");

        /**
         * The max size of log file. If the size is bigger than this, archive the current file, and write into a new file.
         */
        public static final int MAX_FILE_SIZE = 100 * 1024 * 1024;

        /**
         * The log level. Default is debug.
         */
        public static LogLevel LEVEL = LogLevel.INFO;

        /**
         * The expired days of log files.
         */
        public static final int FILE_EXPIRED_DAYS = 5;
    }

}
